[pull] master from kevoreilly:master - #511
Merged
Merged
Conversation
…002) guac_settings.py sets STATIC_ROOT = BASE_DIR/'static'. The commented STATICFILES_DIRS example pointed at the same path; uncommenting it trips Django's staticfiles.E002 (source dirs must not equal the collectstatic destination). Replace the bare example with an explicit warning and a safe alternative dir. Comment-only; no runtime change.
…CFILES_DIRS The commented deployment example set STATIC_ROOT = os.getcwd()/'static', which is the same path as STATICFILES_DIRS (web/static) in settings.py. Uncommenting it for an NGINX deploy (DEBUG=False) makes the collectstatic destination equal a source dir and trips Django's staticfiles.E002, breaking every system check (runserver/collectstatic/etc.). Point the example at a separate dir (static_collected) and document why source must not equal destination.
…ogin loop) The guac-web HTTP views gated on stock login_required -> auth.get_user(), which load_backend()s the exact auth backend the session was created with. guac-web (web.guac_settings) deliberately does not install the allauth app stack, so an OIDC/allauth session's backend is not in its AUTHENTICATION_BACKENDS and get_user() returns AnonymousUser -- so every interactive live-VM console request for an OIDC user (processing jobs only; completed jobs never open the console) was redirected to the login page, even though the browser was authenticated on the main web. Only local ModelBackend admins worked, masking it. The websocket path already solved this with the backend-agnostic resolve_session_user (guac/channels_auth.py); apply the same to the HTTP views via a guac_login_required decorator (user id + session auth-hash check, no load_backend). Redirect-to-login for genuinely anonymous sessions is unchanged. Adds regression tests.
fix(guac): OIDC users bounced to login on the interactive console + staticfiles.E002 footguns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )